/*
 * @Title:
 * @Description:
 * @Author: 靖博君
 * @Date: 2024-02-22 17:36:35
 * @FilePath: /vue3-admin-naive-starter/src/router/permission.ts
 */
import router from '@/router'
import { type RouteRecordName } from 'vue-router'

/**
 * 全局白名单
 */
const whiteList: RouteRecordName[] = ['sso', 'login']

router.beforeEach(async (to, from) => {
  if (to.name && whiteList.includes(to.name)) {
    return true
  }

  return true
})
